package com.mk.datapower.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: peisong.chen
 * @Date: 2019/9/16
 * @Content:
 */
@Slf4j
@Service
public class DataPowerService {
    /**
     * 获取当前用户可以查看的字段
     * 根据 当前用户id、用户所有机构id、数据字段所在的表名 从数据库获得字段List
     *
     * @return
     */
    public List<String> getFieldDataPower(String userId, String orgId, String tableName) {
        log.info("DataPowerService:getFieldDataPower入参 --> userId:{},orgId:{},tableName:{}", userId, orgId, tableName);
        // 此处模拟从数据库获得字段List数据
        List<String> fieldDataPowerList = new ArrayList<>();
        fieldDataPowerList.add("nickName,memberName");
        fieldDataPowerList.add("sex");
        fieldDataPowerList.add("phone");
        fieldDataPowerList.add("cardNo");
        return fieldDataPowerList;
    }
}
